import type { PageQry } from "@/types/common";

export class ScriptTemplatePageQry implements PageQry {
  current: number = 1;
  size: number = 10;
  nameLike?: string;
  tagLike?: string;
}

export class ScriptTemplateSaveCmd {
  id?: string;
  name: string = "";
  script: string = "";
  tag: string = "";
}

export interface ScriptTemplateDTO {
  id: string;
  name: string;
  script: string;
  tag: string;
}

export interface ScriptTemplateExecCmd {
  id: string;
  machineIds: string[];
}

export interface SseEvent {
  id: string;
  data: string;
  event: string;
}

export type SseEventReceived = (event: SseEvent) => void;

export interface ScriptResultDTO {
  success: boolean;
  message: string;
}
